import APP from "./App.vue";
import { createApp, onMounted } from "vue";
import {router} from "@/router"
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'


let app=createApp(APP)
// 全局注册指令
app.directive(
    "getFocus",(ele)=>{
        ele.focus();
    }
)
app.directive(
    "setColor",(ele,binding)=>{
        ele.style.color=binding.value;
    }
)
app.directive(
    "setColor2",{
        mounted(ele,binding){
            ele.style.color=binding.value;
        },
        updated(ele,binding){
            ele.style.color=binding.value;
        }
    }
)

// 注册路由器
app.use(router)
//注册ElePlus
app.use(ElementPlus)

app.mount("#app");